#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QGridLayout>
#include <QMenuBar>
#include <QApplication>
#include <QToolBar>
#include <QFileDialog>
#include <QMessageBox>
#include <QDockWidget>
#include <QPushButton>
#include <QFileDialog>
#include <imagedisplay.h>
#include <imagealldisplay.h>
#include <imagelistdisplay.h>
#include <openfile.h>
#include <selectiondisplay.h>
#include <drawshape.h>

class MainWindow : public QMainWindow
{
    Q_OBJECT

private:
    ImageDisplay *imageD;
    ImageAllDisplay *imageAllD;
    ImageListDisplay *imageListD;
    SelectionDisplay *selectD;
    QMenu *menuFiles;
    QMenu *menuImages;
    QMenu *menuSelect;
    QMenu *menuHelp;
    QAction *openVideo;
    QAction *openConfig;
    QAction *saveConfig;
    QAction *quit;
    QAction *saveImage;
    QAction *deleteImage;
    QAction *selectROI;
    QAction *selectRect;
    QAction *selectCircle;
    QAction *selectLine;
    QAction *infoQt;
    QToolBar *barFichier;
    QToolBar *barImage;
    QToolBar *barSelect;

    QString videoDir;
    QString imageDir;

    QDockWidget *rightDock;
    QDockWidget *bottomDock;

    bool roiChecked;
    bool rectChecked;
    bool circleChecked;
    bool lineChecked;

public:
    explicit MainWindow(QWidget *parent = 0);
    void setDisplay(ImageDisplay *imgD, ImageAllDisplay *imgAD, ImageListDisplay *imgLD, SelectionDisplay *selD);
    QString getVideoDir();
    QString getImageDir();

signals:
    void gettedVideoDir();
    void savedImage(QString dir);
    void deleteCurrentImage();
    void drawShape(ShapeType type);

public slots:
    void openVideoDir();
    void openSaveImage();
    void checkROI();
    void checkRect();
    void checkCircle();
    void checkLine();
    
};

#endif // MAINWINDOW_H
